import java.io.Serializable;
import java.util.Random;


public class Message implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ServerProfile[] recipients;
	private ServerProfile sender;
	private long id;
	
	public Message(ServerProfile[] rs, ServerProfile s) {
		recipients = rs;
		sender = s;
		Random rnd = new Random();
		id = rnd.nextLong();
	}
	
	public Message(ServerProfile[] rs, ServerProfile s, long id) {
		recipients = rs;
		sender = s;
		this.id = id;
	}

	public ServerProfile[] getRecipients() {
		return recipients;
	}

	public void setRecipients(ServerProfile[] recipients) {
		this.recipients = recipients;
	}

	public ServerProfile getSender() {
		return sender;
	}

	public void setSender(ServerProfile sender) {
		this.sender = sender;
	}

	public long getId() {
		return id;
	}
	
	public String toString() {
		return "Sender: " + sender + " Recipients: " + recipients;
	}

}
